home *** CD-ROM | disk | FTP | other *** search
- From: al@ee.pitt.edu (A. Martello)
- Newsgroups: comp.unix.wizards
- Subject: SUMMARY: ftpd -> syslog vs. chroot
- Message-ID: <168440@unix.cis.pitt.edu>
- Date: 26 Aug 91 03:49:42 GMT
- Organization: Univ. of Pittsburgh, Electrical Engineering
-
- Thanks to all who made suggestions regarding the syslog vs. chroot
- problem I encountered in ftpd. Many suggested that adding the
- modifier LOG_NDELAY to the 'openlog' call should fix the problem,
- but it didn't for me (and at least one other respondent).
-
- The answer I used was to get a new syslog.c file which had been
- modified to use the port defined in /etc/services instead of
- logging to /dev/log. The modified syslog.c came from
- jim@jagubox.gsfc.nasa.gov (Jim Jagielski).
-
- My patches to ftpd along with the above mentioned syslog.c
- are available for anonymous ftp. The README file is below.
-
- *******************************************************************
- Alan R. Martello Electrical Engineering Dept.
- al@ee.pitt.edu University of Pittsburgh
- *******************************************************************
-
- This is the file README included in the shell archive available from
- jupiter.ee.pitt.edu (130.49.15.1) /pub/ftpd.mod.shar.
-
- This file documents the changes made by Alan Martello (al@ee.pitt.edu)
- to the Berleley ftp daemon obtained from uunet.uu.net. You need both
- the ftp and ftpd tar files from uunet to recreate the new ftpd since
- they share some common routines.
-
-
- NOTE: You should be very familiar with the ftpd(8) man page before
- reading this file.
-
- The shell archive contains the following files:
- README - this file
- PATCH - the patch file
- glob.c - file they forgot in ftpd.Z but is in ftp.Z; needed to build ftpd
- syslog.c - modified syslog file which logs via /etc/services not /dev/log
- SAMPLE_PATH_SPECIAL - a sample _PATH_SPECIAL file
- SAMPLE_INDIRECT_FILE - a sample file pointed to by SAMPLE_PATH_SPECIAL
-
- The ftp daemon was modified to define three types of users as being
- allowed to have ftp access:
-
- 1) users with local accounts
- 2) users without a local account via an anonymous login
- 3) users without a local account via a pasword protected login
-
- If either 2 or 3 are to be used, then the user 'ftp' MUST
- be created. This user must exist since both type 2 and 3
- login accounts chroot to ~ftp after login.
-
- Logging facilities via syslog(3) have been modified to provide
- selective logging of user login and file retreival (get's).
-
- Logging of successful logins is performed via syslog
- at level LOG_NOTICE progided that logging is turned
- on (via the -l flag to ftpd).
-
- Logging of get's is performed via syslog at the level of LOG_INFO
- if it is compiled in AND logging is enabled (via the -l flag to ftpd).
-
- Note that due to bugs in the syslog.c file in the standard library,
- a new syslog.c file has been included which logs to the port
- listed in /etc/services. This corrects the problem with syslog
- being "turned off" once a chroot was performed since the socket
- /dev/log could no longer be accessed for logging.
-
- Configuration options (things to tweak in ftpd.c)
- -------------------------------------------------
- List of strings 'guest_login' has been defined which determines the
- names of the default guest logins (by default 'ftp' and 'anonymous').
-
- LOG_GET_LOCAL - #define which determines whether to compile in support
- for logging get's of files for local (type 1) users.
-
- LOG_GET_GUEST - #define which determines whether to compile in support
- for logging get's of files for guest_login (type 2) users.
-
- LOG_GET_SPECIAL - #define which determines whether to compile in support
- for logging get's of files for special (type 3) users.
-
- USER_LOCAL - #define which determines whether to compile in code to
- allow local (type 1) users to login.
-
- USER_GUEST - #define which determines whether to compile in code to
- allow guest_login (type 2) users to login.
-
- USER_SPECIAL - #define which determines whether to compile in code to
- allow special (type 3) users to login.
-
- Installation Notes
- ------------------
- 0) obtain ftpd and ftp tar files from uunet.uu.net:/networking and
- apply the supplied PATCH file
-
- 1) Configure the #define symbols at the top of ftpd.c as desired.
-
- 2) Create a new ftpd and replace the current in.ftpd pointed to
- by /etc/inetd.conf; add the '-l' flag to the invocation of in.ftpd
- if any logging is to be performed.
-
- 3) Create the file defined in pathnames as _PATH_SPECIAL to list the
- special password protected accounts (if included in ftpd.c).
- The format of _PATH_SPECIAL is shown in the file SAMPLE_PATH_SPECIAL
-
- 5) Create any files pointed to by the file specified as _PATH_SPECIAL.
- The format of these files is shown in SAMPLE_INDIRECT_FILE. MAKE SURE
- ALL THESE FILES ARE OWNED BY ROOT AND HAVE PROTECTION 600 SINCE THEY
- CONTAIN UNENCRYPTED PASSWORDS.
-
- 6) make
-
- 7) install in place of the old ftpd (make sure you save the old one first)
-
- ----------------------------------------------------------------------
- end of message
-
-